-
Notifications
You must be signed in to change notification settings - Fork 549
Deprecate containerPackageInfo
parameter in createOdspCreateContainerRequest
#23919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…meter containerPackageInfo
@@ -11,6 +11,7 @@ import { | |||
} from "@fluidframework/odsp-doclib-utils/internal"; | |||
import { | |||
OdspDriverUrlResolver, | |||
// eslint-disable-next-line import/no-deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to disable import no deprecated, because even though the version that is being imported is technically not the deprecated version, eslint detected that it was using that one. Does anyone know if there's a better way to deprecate the parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linter doesn't understand / is being conservative. This is okay, but should add a comment with the work item that will clean this up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only alternative might be to import the module as in import * as OdspDriver from "...
.
But since it is temporary, this is good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looking for comment with the work item number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recently learned of a better format to comment lint disables using --
:
// eslint-disable-next-line import/no-deprecated -- This is the non-deprecated call, but eslint doesn't distinguish. TODO AB#31049 remove suppression
packages/drivers/odsp-driver/src/createOdspCreateContainerRequest.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a suggestion to enhance the deprecation notice comment. Otherwise, the API changes look good.
// eslint-disable-next-line import/no-deprecated | ||
createOdspCreateContainerRequest, | ||
createOdspUrl, | ||
} from "@fluidframework/odsp-driver/internal"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an example and should not be importing from /internal. Recommend fixing these when we have to touch them. See examples that use examples/.eslintrc.cjs
and/or examples/.eslintrc.data.cjs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should none of the odsp-driver exports be /legacy then? At least some of these are and should be okay to use /legacy import instead of /internal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thread nudge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more aggressive nudge (@markfields , @Abe27342 , @alexvy86 )
packages/drivers/odsp-driver/src/createOdspCreateContainerRequest.ts
Outdated
Show resolved
Hide resolved
// eslint-disable-next-line import/no-deprecated | ||
createOdspCreateContainerRequest, | ||
createOdspUrl, | ||
} from "@fluidframework/odsp-driver/internal"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other option for this and other /internal import is to make the /internal export only export the non-deprecated version.
The how-to is covered at https://github.com/microsoft/FluidFramework/wiki/Change-Recipes#moving-api-to-internal
The ./internal.ts version could look like:
export const odspCreateContainerRequest: (
siteUrl: string,
driveId: string,
filePath: string,
fileName: string,
createShareLinkType?: ISharingLinkKind,
) => ReturnType<typeof createOdspCreateContainerRequestOriginal> = createOdspCreateContainerRequestOriginal;
Since there are only two internal uses, may not be worth the effort.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's not worth the effort.
I don't quite follow this statement in the description: "With PR: #22849 we introduced a parameter for ODSP that will not be used." |
The query parameter (I'm guessing that's what QP stands for), will later be ignored. The new alternative is that it can be added in the constructor of Therefore, having the parameter in the request is unnecessary. |
I am not sure I understand what it exactly means to be processed and added when the request is resolved. Sounds like the deprecation issue needs some more content. If originally someone passed |
packages/drivers/odsp-driver/src/createOdspCreateContainerRequest.ts
Outdated
Show resolved
Hide resolved
packages/drivers/odsp-driver/src/createOdspCreateContainerRequest.ts
Outdated
Show resolved
Hide resolved
@@ -11,6 +11,7 @@ import { | |||
} from "@fluidframework/odsp-doclib-utils/internal"; | |||
import { | |||
OdspDriverUrlResolver, | |||
// eslint-disable-next-line import/no-deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recently learned of a better format to comment lint disables using --
:
// eslint-disable-next-line import/no-deprecated -- This is the non-deprecated call, but eslint doesn't distinguish. TODO AB#31049 remove suppression
.changeset/wicked-eagles-search.md
Outdated
"section": deprecation | ||
--- | ||
|
||
The parameter `containerPackageInfo` in `createOdspCreateContainerRequest()` is deprecated and will be removed in version 2.40. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter `containerPackageInfo` in `createOdspCreateContainerRequest()` is deprecated and will be removed in version 2.40. | |
Deprecate the `containerPackageInfo` parameter in `createOdspCreateContainerRequest()` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tylerbutler and @jzaffiro - I think Mario got comments both ways on whether the removal version should be included in this text.
.changeset/wicked-eagles-search.md
Outdated
|
||
The parameter `containerPackageInfo` in `createOdspCreateContainerRequest()` is deprecated and will be removed in version 2.40. | ||
|
||
This will mean that the name of the containerPackage can no longer be sent through the request. Instead it can be added in the constructor of `OdspDriverUrlResolverForShareLink`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will mean that the name of the containerPackage can no longer be sent through the request. Instead it can be added in the constructor of `OdspDriverUrlResolverForShareLink`. | |
The name of the containerPackage can no longer be sent through the request. This functionality will be removed in version 2.40. Instead, it can be added in the constructor of `OdspDriverUrlResolverForShareLink`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changeset looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving for docs.
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output
|
…ontainerRequest` (#24481) ## Description When communicating with partners about work of [issue #23882](#23882), I realized that the code that was meant to be deleted will actually still be used, so there no longer is any need for the deprecation and removal. This PR is meant to be a revert for this one [PR #23919](https://github.com/microsoft/FluidFramework/pull/23919/files) ## Breaking Changes This will close [issue #23882](#23882) without actually deleting any code. ## Reviewer Guidance Let me know if you have any questions related to the revert or the code in general. Fixes: [AB#31049](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/31049)
Description
As of PR #22849 (released in 2.23), preferred pattern to add "containerPackageName" parameter to request is via URL resolver instead of
createOdspCreateContainerRequest
's last parameter.Tag calling
createOdspCreateContainerRequest
with that parameter as deprecated now, and then in the 2.40 release remove that form altogether.Future Breaking Changes
See issue 23882 for more details.
Reviewer Guidance
Please let me know if there's anything else I should be aware of or can do better, thanks!
Fixes: AB#31450